<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Close Informix connection</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ifx-byteasvarchar.html">ifx_byteasvarchar</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.ifx-connect.html">ifx_connect</a></div>
 <div class="up"><a href="ref.ifx.html">Informix 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.ifx-close" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ifx_close</h1>
  <p class="verinfo">(PHP 4, PHP &lt;=5.2.0)</p><p class="refpurpose"><span class="refname">ifx_close</span> &mdash; <span class="dc-title">Close Informix connection</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.ifx-close-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>ifx_close</strong></span>
    ([ <span class="methodparam"><span class="type">resource</span> <code class="parameter">$link_identifier</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>ifx_close()</strong></span> closes the link to an Informix
   database that&#039;s associated with the specified link identifier.
  </p>
  <p class="para">
   Note that this isn&#039;t usually necessary, as non-persistent open
   links are automatically closed at the end of the script&#039;s
   execution.
  </p>
  <p class="para">
   <span class="function"><strong>ifx_close()</strong></span> will not close persistent links
   generated by <span class="function"><a href="function.ifx-pconnect.html" class="function">ifx_pconnect()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ifx-close-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">link_identifier</code></em></dt>

     <dd>

      <p class="para">
       The link identifier. If not specified, the last opened link is
       assumed.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ifx-close-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ifx-close-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-1167">
    <p><strong>Example #1 Closing a Informix connection</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$conn_id&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ifx_connect&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"mydb@ol_srv"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"itsme"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"mypassword"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;...&nbsp;some&nbsp;queries&nbsp;and&nbsp;stuff&nbsp;...&nbsp;*/<br /></span><span style="color: #0000BB">ifx_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ifx-close-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.ifx-connect.html" class="function" rel="rdfs-seeAlso">ifx_connect()</a> - Open Informix server connection</span></li>
    <li class="member"><span class="function"><a href="function.ifx-pconnect.html" class="function" rel="rdfs-seeAlso">ifx_pconnect()</a> - Open persistent Informix connection</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ifx-byteasvarchar.html">ifx_byteasvarchar</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.ifx-connect.html">ifx_connect</a></div>
 <div class="up"><a href="ref.ifx.html">Informix 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
